package com.dragon.concurrent.demo.deadlock;

public class DeadLockTest {

    public static void main(String[] args) {
        OtherService otherService = new OtherService();
        DeadLockService deadLockService = new DeadLockService(otherService);
        otherService.setDeadLockService(deadLockService);
        new Thread(() -> {
            while (true) {
                otherService.m();
            }
        }).start();

        new Thread(() -> {
            while (true) {
                deadLockService.s1();
            }
        }).start();
    }
}
